package de.hsowl.tod4a.global.threading;

/**
 * A Job to execute on a thread
 * 
 * @author Sebastian Witt
 * 
 */
public abstract class Job {

	public Object result;
	public boolean executed = false;
	public boolean started = false;

	/**
	 * A work order to be done
	 * 
	 * @return
	 */
	public abstract Object doWork();

	public synchronized Object getResult() {
		return result;
	}

	public synchronized void setResult(Object result) {
		this.result = result;
	}

	public synchronized boolean isExecuted() {
		return executed;
	}

	public synchronized void setExecuted(boolean executed) {
		this.executed = executed;
	}

	public synchronized boolean isStarted() {
		return started;
	}

	public synchronized void setStarted(boolean started) {
		this.started = started;
	}

}
